// bottom
const bottom = document.querySelector(`.bottom`)
const btn1 = document.querySelector(`.btn1`)
const btn2 = document.querySelector(`.btn2`)

const box=document.querySelector('.boxfater')
// let flag=true
box.addEventListener('click',function(e){
    
    if(e.target.tagName==='BUTTON'){
    if(e.target.innerHTML==='展开'){
         e.target.innerHTML='收回'
         e.target.parentElement.nextElementSibling.style.display='block'
         console.log();
        }else{
          e.target.innerHTML='展开'
          e.target.parentElement.nextElementSibling.style.display='none'
        }
       
    }
})
/* btn1.addEventListener(`click`,function () {
   
    if (btn2.style.display=`none`) {
        bottom.style.display = `block`
    } if (bottom.style.display=`block`) {
           btn1.style.display= `none`
           btn2.style.display=`block`
    } 
    
})
btn2.addEventListener(`click`,function () {
    if (btn1.style.display= `none`) {
        bottom.style.display = `none`
    } if (bottom.style.display = `none`) {
        btn1.style.display=`block`
        btn2.style.display=`none`
    }
})

// bottom2 btn3 btn4
const bottom2 = document.querySelector(`.bottom2`)
const btn3 = document.querySelector(`.btn3`)
const btn4 = document.querySelector(`.btn4`)


btn3.addEventListener(`click`,function () {
   
    if (btn4.style.display=`none`) {
        bottom2.style.display = `block`
    } if (bottom2.style.display=`block`) {
           btn3.style.display= `none`
           btn4.style.display=`block`
    } 
    
})
btn4.addEventListener(`click`,function () {
    if (btn3.style.display= `none`) {
        bottom2.style.display = `none`
    } if (bottom2.style.display = `none`) {
        btn3.style.display=`block`
        btn4.style.display=`none`
    }
})
// bottom3 btn5 btn6
const bottom3 = document.querySelector(`.bottom3`)
const btn5 = document.querySelector(`.btn5`)
const btn6 = document.querySelector(`.btn6`)


btn5.addEventListener(`click`,function () {
   
    if (btn6.style.display=`none`) {
        bottom3.style.display = `block`
    } if (bottom3.style.display=`block`) {
           btn5.style.display= `none`
           btn6.style.display=`block`
    } 
    
})
btn6.addEventListener(`click`,function () {
    if (btn5.style.display= `none`) {
        bottom3.style.display = `none`
    } if (bottom3.style.display = `none`) {
        btn5.style.display=`block`
        btn6.style.display=`none`
    }
})
 */
